<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<%@page import="com.webside.points.wechat.Constant"%> 
<%
	String  openId = (String)request.getSession().getAttribute("openId");
	String url = Constant.REALM_URL;
%>
<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
  <meta name="keywords" content="" />
  <meta name="description" content="" />
  <link rel="stylesheet" href="../css/amazeui.min.css">
  <link rel="stylesheet" href="../css/wap.css">
  <link rel="stylesheet" href="../css/style.css"/>
  <link rel="stylesheet" href="../css/weui.css" />
   <link rel="stylesheet" href="../css/ydui.css?rev=@@hash"/>

  <title>审核专家</title>
  <script src="../js/jquery.js"></script>
  <script type="text/javascript"
	src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
  <script src="../js/amazeui.min.js"></script>
  <script src="../js/jssdk.js"></script>
  <script type="text/javascript">
	$(function(){
		var expertTypeId = $("#expertTypeId").text();
		$.post("${ctx}/issueType/findByIssueTypeId", {id:expertTypeId}, function(data, status, xhr){
			$("#expertTypeId").text(data.issueTypeName);
		},'json');
		
		
		
	})
	function previewImage(e){
		var image = $(e).attr("src").replace("../","<%=url%>");;
		wx.previewImage({
			current: image, // 当前显示图片的http链接
			urls: [image] // 需要预览的图片http链接列表
		});
	}
	function audit(){
		var expertId = $("#expertId").val();
		 $('#my-confirm').modal({
			relatedTarget: this,
			onConfirm: function(options) {
				$('#my-prompt').modal({
				  relatedTarget: this,
				  onConfirm: function(e) {
					window.location.href="${ctx }/expert/updateStatus?auditStatus=3&expertId="+expertId+"&type=wechat&message="+ encodeURI(encodeURI(e.data)) ;
				  },
				  onCancel: function(e) {
				  }
				});
			},
			// closeOnConfirm: false,
			onCancel: function() {
				window.location.href="${ctx }/expert/updateStatus?auditStatus=1&expertId="+expertId+"&type=wechat";
			}
		  });
	}
  </script>
</head>
<body style="background:#ececec">
<!--错误提示-->
<div class="weui-toptips weui-toptips_warn js_tooltips"></div>
  <div class="pet_mian" >
    <div class="pet_content pet_content_list pet_hd">
      <div class="pet_article_like">
        <div class="pet_content_main pet_article_like_delete">
          <div data-am-widget="list_news" class="am-list-news am-list-news-default am-no-layout">
            <div class="am-list-news-bd">
	      	<form action="${ctx }/expert/updateStatus" method="post" id="form">
				<input type="hidden" value=" ${expertEntity.id}" name="expertId" id="expertId">
				<input type="hidden" value="1" name="auditStatus" id="auditStatus">
				<input type="hidden" value="wechat" name="type" id="type">
	      		 <div class="button-sp-area">
		             <div class="weui-cell">
		                <div class="weui-cell__hd">
		                    <label for="" class="weui-label">专家类型</label>
		                </div>
		                <div class="weui-cell__bd" id="expertTypeId">
		                    ${expertEntity.expertType}
		                </div>
		            </div>
		            </div>
					
		           
		            <div class="weui-cell">
		                <div class="weui-cell__hd"><label class="weui-label">姓名</label></div>
		                <div class="weui-cell__bd">
		                    ${expertEntity.name}
		                </div>
		            </div>
					
					
					 <div class="weui-cell">
		                <div class="weui-cell__hd"><label class="weui-label">性别</label></div>
		                <div class="weui-cell__bd">
							${expertEntity.sex}
		                </div>
		            </div>


					
		            <div class="weui-cell">
		                <div class="weui-cell__hd"><label class="weui-label">电话号码</label></div>
		                <div class="weui-cell__bd">
							${expertEntity.phone}
		                </div>
		            </div>
					 <div class="weui-cell">
		                <div class="weui-cell__hd"><label class="weui-label">身份证号</label></div>
		                <div class="weui-cell__bd">
							${expertEntity.idCard}
		                </div>
		            </div>
					
					
					<div class="weui-cell">
						 <div class="weui-cell__hd"><label class="weui-label">身份证照片（正面）</label></div>
						<div class="weui-cell__bd">
							<img src="${expertEntity.idCardImageFront}" style="width:200px;height:100px;" onclick="previewImage(this)">
						</div>
					</div>
					<div class="weui-cell">
						 <div class="weui-cell__hd"><label class="weui-label">身份证照片（反面）</label></div>
						<div class="weui-cell__bd">
		                   	<img src="${expertEntity.idCardImageReverse}" style="width:200px;height:100px;" onclick="previewImage(this)">
						</div>							
					</div>
					 <div class="weui-cell">
						 <div class="weui-cell__hd"><label class="weui-label">个人近照 （一张）</label></div>
						<div class="weui-cell__bd">
		                   	<img src="${expertEntity.selfie}" style="width:80px;height:80px;" onclick="previewImage(this)">			
						</div>		
					</div>

				
					<div class="weui-cell" style="padding: 10px 15px;">
						<div class="weui-cell__hd">
							<label for="" class="weui-label">居住地</label>
						</div>
						 
						<div class="weui-cell__bd">
							${expertEntity.address}
						</div>
					</div>
					
					<div class="weui-cell">
		                <div class="weui-cell__hd"><label class="weui-label">详细地址</label></div>
		                <div class="weui-cell__bd">
		                    ${expertEntity.detailedAddress}
		                </div>
		            </div>
					
					
					
					<div class="weui-cell">
		                <div class="weui-cell__hd"><label class="weui-label">工作单位</label></div>
		                <div class="weui-cell__bd">
							${expertEntity.workUnit}
		                </div>
		            </div>
		             <div class="weui-cell">
		                <div class="weui-cell__hd"><label class="weui-label">职务</label></div>
		                <div class="weui-cell__bd">
							${expertEntity.duty}
		                </div>
		            </div>
					 <div class="weui-cell">
		                <div class="weui-cell__hd"><label class="weui-label">毕业学校</label></div>
		                <div class="weui-cell__bd">
							${expertEntity.education}
		                </div>
		            </div>
					<div class="weui-cell">
						<div class="weui-cell__hd"><label class="weui-label">学历/文凭</label></div>
		                <div class="weui-cell__bd">
		                    ${expertEntity.resumeWriting}
		                </div>
		            </div>
					 <div class="weui-cell">
		                <div class="weui-cell__hd"><label class="weui-label">专长</label></div>
		                <div class="weui-cell__bd">
							${expertEntity.speciality}
		                </div>
		            </div>
		            <div class="weui-cell">
		                <div class="weui-cell__hd"><label class="weui-label">著作/文章</label></div>
		                <div class="weui-cell__bd">
							${expertEntity.work}
		                </div>
		            </div>
		            
		          <div class="weui-cell">
						<div class="weui-cell__hd"><label class="weui-label">签名</label></div>
		                <div class="weui-cell__bd">
							${expertEntity.describe}
		                </div>
		            </div>
		        <div class="button-sp-area" style="margin-top:30px;">
		            <input type="button" class="weui-btn weui-btn_primary" value="立即审核" onclick="audit()">
		        </div>
			</form>
	        </div>
              </div>

            </div>

          </div>

        </div>
      </div>
	  	  <div class="am-modal am-modal-confirm" tabindex="-1" id="my-confirm">
  <div class="am-modal-dialog">
    <div class="am-modal-hd">提示</div>
    <div class="am-modal-bd">
      审核结果
    </div>
    <div class="am-modal-footer">
      <span class="am-modal-btn" data-am-modal-cancel>通过</span>
      <span class="am-modal-btn" data-am-modal-confirm>驳回</span>
    </div>
  </div>
</div>
<div class="am-modal am-modal-prompt" tabindex="-1" id="my-prompt">
  <div class="am-modal-dialog">
    <div class="am-modal-hd">驳回理由</div>
    <div class="am-modal-bd">
      <textarea rows="3"  class="am-modal-prompt-input"></textarea>
    </div>
    <div class="am-modal-footer">
      <span class="am-modal-btn" data-am-modal-cancel>取消</span>
      <span class="am-modal-btn" data-am-modal-confirm>提交</span>
    </div>
  </div>
</div>
</body>
  </html>